package org.example.ims.Service.Base;

import org.example.ims.Entity.Base.Supplier;
import org.springframework.data.domain.Page;

import java.util.Optional;

public interface SupplierService {
    // 获取所有供货商（带分页）
    Page<Supplier> getAllSuppliers(Integer page, Integer size);

    Optional<Supplier> getSupplierById(Integer id);

    Supplier createSupplier(Supplier supplier);

    // 根据名称获取供货商
    Supplier getSupplierByName(String name);

    Page<Supplier> searchSuppliers(String name, String contact, String phone, Integer page, Integer size);

    Supplier updateSupplier(Integer id, Supplier supplierDetails);

    void deleteSupplier(Integer id);
}
